package com.jiuyin.dianjing.ui.activity.team;

import android.os.Bundle;

import com.jiuyin.dianjing.R;
import com.jiuyin.dianjing.api.constant.ApiConstant;
import com.jiuyin.dianjing.ui.activity.base.BaseActivity;
import com.jiuyin.dianjing.ui.fragment.team.TeamMembersFragment;

import static com.jiuyin.dianjing.api.constant.ApiConstant.KEY_PART;
import static com.jiuyin.dianjing.api.constant.ApiConstant.KEY_TEAMID;

/**
 * 全部成员
 */
public class TeamMembersActivity extends BaseActivity {
    public String mTeamId;
    //0 队长 1 管理 2 成员 3未加入
    public int mPart;

    @Override
    protected int setLayoutId() {
        return R.layout.activity_team_members;
    }

    @Override
    protected void initData() {
        mTeamId = getIntent().getStringExtra(KEY_TEAMID);
        mPart = getIntent().getIntExtra(KEY_PART, ApiConstant.VALUE_PART_NOT_JOIN);
        Bundle args = new Bundle();
        args.putString(KEY_TEAMID, mTeamId);
        args.putInt(KEY_PART, mPart);
        TeamMembersFragment teamMembersFragment =
                TeamMembersFragment.newInstance(TeamMembersFragment.TYPE_DEFAULT, mTeamId, mPart);
        getSupportFragmentManager().beginTransaction()
                .replace(R.id.nav_host_fragment, teamMembersFragment)
                .commit();
    }

    @Override
    protected void initView() {

    }
}
